﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Wpf.Netdisk.Models.BaseModel
{
    public class ApiResult
    {
        public ApiResult() { }
        /// <summary>
        /// 构造
        /// </summary>
        /// <param name="code">返回编码</param>
        /// <param name="message">返回消息</param>
        /// <param name="data">返回数据</param>
        public ApiResult(int code, string message, object data)
        {
            Code = code;
            Message = message;
            Data = data;
        }

        /// <summary>
        /// 接口编码
        /// </summary>
        public int Code { get; set; }

        /// <summary>
        /// 消息
        /// </summary>
        public string Message { get; set; }

        /// <summary>
        /// 数据类型
        /// </summary>
        public object Data { get; set; }
    }
    public class ApiResult<T> 
    {
        /// <summary>
        /// 构造
        /// </summary>
        /// <param name="code">返回编码</param>
        /// <param name="message">返回消息</param>
        /// <param name="data">返回数据</param>
        public ApiResult(int code, string message, T data)
        {
            Code = code;
            Message = message;
            Data = data;
        }

        /// <summary>
        /// 接口编码
        /// </summary>
        public int Code { get; set; }

        /// <summary>
        /// 消息
        /// </summary>
        public string Message { get; set; }

        /// <summary>
        /// 数据类型
        /// </summary>
        public T Data { get; set; }
    }
}
